package com.greateamd.timetableasy.client.widgets.event;

import com.greateamd.timetableasy.client.domain.EventType;
import com.greateamd.timetableasy.client.widgets.LabelizableListBox;

public final class EventTypeListBox extends LabelizableListBox {

	public EventTypeListBox() {
		super(false);
		for(EventType value : EventType.values()){
			addValue(value.getText());
		}
	}
	
	public void setValue(EventType type) {
		super.setValue(type.getText());
	}
	
	public EventType getEventTypeSelected(){
		return EventType.getEventTypeOf(getValue());
	}
}
